﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class PhongBanBus
    {
        private static PhongBanData db = new PhongBanData();
        public static List<PHONG_BAN> TimPhongBanTheoTen(string ten_phong_ban, int tong_so_dong)
        {
            return db.TimPhongBanTheoTen(ten_phong_ban, tong_so_dong);
        }

        public static string ThemMoi(PHONGBANPARAM PHONGBAN)
        {
            if (db.ThemMoi(PHONGBAN))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string CapNhat(PHONGBANPARAM PHONGBAN)
        {
            if (db.CapNhat(PHONGBAN))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string Xoa(string[] MA_PHONG_BAN)
        {
            if (db.Xoa(MA_PHONG_BAN))
            {
                return "1";
            }
            else
                return db.Error;
        }

    }
}